<include file="Public:header" />

<div class="container">
	<!-- Docs nav ================================================== -->
	<div class="page-header">
		<h4>新增 首页幻灯片</h4>
	</div>
	<div class="row">
		<div class="span12">
			<include file="Public:alert" />
			<form action="__APP__/index.php/Sliders/add/" method="post" enctype="multipart/form-data">
				<input  type="hidden" name="role_id" value="{$Think.session.role_id}"/>
				<table class="table" border="0" cellspacing="1" cellpadding="0">
					<thead>
						<tr>
							<td colspan="2"><input name="submit" class="btn btn-primary" type="submit" value="保存"/>&nbsp; <input class="btn btn-primary" name="submit" type="submit" value="保存 & 新增"/> &nbsp;<input class="btn" type="button" onclick="javascript:history.go(-1)" value="返回"/></td>
						</tr>
					</thead>
					<tfoot>
						<tr>
							<td colspan="2"><input class="btn btn-primary"  name="submit" type="submit" value="保存"/> &nbsp;<input class="btn btn-primary" type="submit" value="保存 & 新增"/>&nbsp; <input class="btn" type="button" onclick="javascript:history.go(-1)" value="返回"/></td>
						</tr>
					</tfoot>
					<tbody>
						
						<tr>
							<td class="tdleft">标题</td>
							<td><input class="span3" type="text" name="title" id="title" size="80" placeholder="请输入标题"></td>
						</tr>
						
						<tr>
							<td class="tdleft">说明</td>
							<td>
								<textarea name="intro" id="intro" style="width: 800px; height: 100px;"></textarea>
							</td>
						</tr>
						<tr>
							<td class="tdleft">图片</td>
							<td>
							 <input type="file" name="imgfile" />
							</td>
						</tr>
						<tr>
							<td class="tdleft">图片链结</td>
							<td><input class="span3" type="text" name="url" id="url" placeholder="图片链结" size="60" value=""></td>
						</tr>
						<tr>
							<td class="tdleft">排序</td>
							<td><input class="span3" type="text" name="sort" id="sort" placeholder="排序" size="5" value="100"></td>
						</tr>
						
					</tbody>
				</table>
			</form>

		</div>
	</div>
</div>
<script type="text/javascript">
	<if condition="C('ismobile') eq 1">
		width=$('.container').width() * 0.9;
		$("#content").css({
			width : width
		});
	</if>
	$("input[name='submit']").click(function(){			
		if($("#title").val() == null || $("#title").val() == ""){
			alert('详情不能为空');
			return false;
		}
	})
	$(".fa-slack").parent().parent().addClass("active");
	$(".fa-th-large").parent().parent().addClass("active");
</script>
<include file="Public:footer" />